import { useParams, useSearchParams } from "react-router-dom";


const Login = () => {
    const [params] = useSearchParams();
    const params2 = useParams(); // 
    return (
       <div>
         <div>接收searchParams参数:<br></br>
          ---id:{params.get("id")}<br></br>
          ---name:{params.get("name")}<br></br></div>
         <div>接受params参数:<br></br>
         ---id:{params2.id}<br></br>
         ---name:{params2.name}</div>
       </div>
    )
}
export default Login;